import java.math.*;
import java.util.Scanner;
import java.util.Arrays;
public class Main {

	public static void main(String[] args) {
		Scanner input=new Scanner(System.in);
		while(input.hasNextInt()){
			int num=input.nextInt();
			String str;
			String[][] str1=new String[num][];
			for (int i = 0; i < num; i++) {
				str1[i]=new String[i+1];
				for (int j = 0; j < i+1;j++){
					str=String.format("%d*%d=%d",i+1,j+1,(i+1)*(j+1));
					if(j==i)
						System.out.printf("%s",str);
					else
						System.out.printf("%-7s",str);
					str1[i][j]=new String(str);
				}
				System.out.println(""); ;
			}
	       System.out.println(Arrays.deepToString(str1));
        }			
		}
		}
	
